Optimal. Leaf size=122 \[ -\frac {a^3 (A-5 i B)}{3 c^5 f (\tan (e+f x)+i)^3}+\frac {a^3 (2 B+i A)}{c^5 f (\tan (e+f x)+i)^4}+\frac {4 a^3 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}-\frac {a^3 B}{2 c^5 f (\tan (e+f x)+i)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3588, 77} \[ -\frac {a^3 (A-5 i B)}{3 c^5 f (\tan (e+f x)+i)^3}+\frac {a^3 (2 B+i A)}{c^5 f (\tan (e+f x)+i)^4}+\frac {4 a^3 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}-\frac {a^3 B}{2 c^5 f (\tan (e+f x)+i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 3588
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {(a+i a x)^2 (A+B x)}{(c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (-\frac {4 a^2 (A-i B)}{c^6 (i+x)^6}-\frac {4 i a^2 (A-2 i B)}{c^6 (i+x)^5}+\frac {a^2 (A-5 i B)}{c^6 (i+x)^4}+\frac {a^2 B}{c^6 (i+x)^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {4 a^3 (A-i B)}{5 c^5 f (i+\tan (e+f x))^5}+\frac {a^3 (i A+2 B)}{c^5 f (i+\tan (e+f x))^4}-\frac {a^3 (A-5 i B)}{3 c^5 f (i+\tan (e+f x))^3}-\frac {a^3 B}{2 c^5 f (i+\tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 4.50, size = 91, normalized size = 0.75 \[ \frac {a^3 (\cos (8 e+11 f x)+i \sin (8 e+11 f x)) (-4 (A+4 i B) \sin (2 (e+f x))+4 (B-4 i A) \cos (2 (e+f x))-15 i A)}{240 c^5 f (\cos (f x)+i \sin (f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 64, normalized size = 0.52 \[ \frac {{\left (-6 i \, A - 6 \, B\right )} a^{3} e^{\left (10 i \, f x + 10 i \, e\right )} - 15 i \, A a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (-10 i \, A + 10 \, B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )}}{240 \, c^{5} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 6.87, size = 309, normalized size = 2.53 \[ -\frac {2 \, {\left (15 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 30 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 15 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 140 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 10 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 170 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 65 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 282 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 12 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 170 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 65 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 140 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 10 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 30 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{15 \, c^{5} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{10}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 87, normalized size = 0.71 \[ \frac {a^{3} \left (-\frac {B}{2 \left (\tan \left (f x +e \right )+i\right )^{2}}-\frac {-4 i A -8 B}{4 \left (\tan \left (f x +e \right )+i\right )^{4}}-\frac {-5 i B +A}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {4 i B -4 A}{5 \left (\tan \left (f x +e \right )+i\right )^{5}}\right )}{f \,c^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.01, size = 128, normalized size = 1.05 \[ \frac {\frac {a^3\,\left (4\,A+B\,1{}\mathrm {i}\right )}{30}+\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,\left (5\,B+A\,10{}\mathrm {i}\right )}{30}-\frac {B\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3}{2}-\frac {a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (10\,A-B\,5{}\mathrm {i}\right )}{30}}{c^5\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,5{}\mathrm {i}-10\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,10{}\mathrm {i}+5\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.12, size = 219, normalized size = 1.80 \[ \begin {cases} - \frac {960 i A a^{3} c^{10} f^{2} e^{8 i e} e^{8 i f x} + \left (640 i A a^{3} c^{10} f^{2} e^{6 i e} - 640 B a^{3} c^{10} f^{2} e^{6 i e}\right ) e^{6 i f x} + \left (384 i A a^{3} c^{10} f^{2} e^{10 i e} + 384 B a^{3} c^{10} f^{2} e^{10 i e}\right ) e^{10 i f x}}{15360 c^{15} f^{3}} & \text {for}\: 15360 c^{15} f^{3} \neq 0 \\\frac {x \left (A a^{3} e^{10 i e} + 2 A a^{3} e^{8 i e} + A a^{3} e^{6 i e} - i B a^{3} e^{10 i e} + i B a^{3} e^{6 i e}\right )}{4 c^{5}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________